<div id="content">
	<div id="totalblock">
               <div id="slider-wrapper">
        
            <div id="slider" class="nivoSlider">
                <img src="images/slideimg/1.jpg" alt="" />
                <a href="http://oto4sale.com"><img src="images/slideimg/2.jpg" alt="" title="This is an example of a caption" /></a>
                <img src="images/slideimg/3.jpg" alt="" />
                <img src="images/slideimg/4.jpg" alt="" title="#htmlcaption" />
            </div>
            <div id="htmlcaption" class="nivo-html-caption">
                <strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
            </div>
        
        </div>
								<div id="userwrap">
							<div id="regbtn" class="regbtn"><a href="<?php echo base_url(); ?>register">Đăng Ký</a></div>
							<div id="loginbtn" class="regbtn"><a href="">Đăng Tin</a></div>
						</div>
						</div>
			<div style="clear:left;"></div>
			<?php 
				// install car menu
				echo $car_menu; 
			?>
				<div id="login_form_wrapper">
		    <form action="<?php echo base_url(); ?>login" name="login_form" id="login_form" method="post">
			<p>
			    <label for="login_username">Tên đăng nhập:</label>
			    <input type="text" size="20" id="login_username" name="username" />
			</p>
			<p>
			    <label for="login_password">Mật khẩu:</label>
			    <input type="password" size="20" id="login_password" name="password" />			
			</p>
			<p>
			    <label>&nbsp;</label>
			    <input type="submit" name="login" id="login" value="Đăng nhập" />
			</p>
		    </form>
		</div>
	<div id="articles">
		<?php if(count($articles > 0)) : ?>
		<?php foreach($articles as $article) : ?> 
			<div class="article_block">
				<h2>Bán xe Mercedes R350 <span class="article_price">Giá: <?php echo $article['price']; ?></span></h2>	
				<div class="article_content">
					<img width="180" height="120" align="left" src="<?php echo base_url(); ?>images/car/<?php echo $article['carimage']; ?>" />
					<div class="article_text">
						<?php echo $article['description']  ?><br/>
						<span class="article_date">Đăng vào <?php echo date(' H:i:s d/m/Y', strtotime($article['date_created'])); ?></span>
					</div>
				</div>
			</div>		
		<?php endforeach; ?>
		<?php endif; ?>
		<div style="clear:left;"></div>
		
		<div class="pagination">
			<?php
				$link = base_url() . 'page/'; 
				echo $nav->get_html_navigation($link); 
			?>
		</div>
	</div> 
</div>